package com.yyw.springboot02web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Arrays;
import java.util.Map;

/**
 * @ClassName HelloController
 * @Description TODO
 * @Author YiYuWei
 * @Date 2020/6/26 14:53
 * @Version 1.0
 */
@Controller
public class HelloController {
    @ResponseBody
    @RequestMapping("/hello")
    public String hello(){
        return "hello";
    }

    @RequestMapping("/succes")
    public String succes(Map<String,Object> map){
        map.put("hello","yyw");
        map.put("list", Arrays.asList("lisi","zhangsan","wangwu"));
        return "succes";
    }
}
